import Vue from 'vue'
import Home from '@/views/Home'

import Banner from '@/views/banner'
import VueRouter from 'vue-router'
import FlowerDetails from '@/views/details/FlowerDetails'
import CakeDetails from '@/views/details/CakeDetails'
import BouquetDetails from '@/views/details/BouquetsDetails'
import Login from '@/views/Login'
import Register from '@/views/Register'
import Cart from '@/views/Cart'
import Flowers from '@/views/Flowers'
import Breadcrumb from '@/components/Breadcrumb'
import Giftboxs from '@/views/Giftboxs'
import Order from '@/views/order/index.vue'
import Panding from '@/views/order/Panding_payment.vue'
import Receipt from '@/views/order/Panding_receipt.vue'
import Comment from '@/views/order/Panding_comment.vue'
import All from '@/views/order/All.vue'
import Cakes from "@/views/Cakes.vue"
import Bouquets from "@/views/Bouquets.vue"
import GiftboxDetail from '@/views/details/GiftboxDetails'


Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'home',
    component: Home,
    meta: {
      title: '首页',
      icon: 'dashboard'
    },
    children: [{
      path: '/',
      name: 'Main',
      component: Banner
    }]
  },



  {
    path: '/cakedetails',
    name: 'cakedetails',
    component: CakeDetails,
    meta: {
      title: '蛋糕详情',
      icon: 'dashboard'
    },

  },
  {
    path: '/flowerdetails',
    name: 'flowerdetails',
    component: FlowerDetails,
    meta: {
      title: '鲜花详情',
      icon: 'dashboard'
    },
  }
  ,
  {
    
      path: '/bouquetDetails',
      name: 'bouquetDetails',
      component: BouquetDetails,
      meta: {
        title: '鲜花详情',
        icon: 'dashboard'
      },
    
  },
  {
    
    path: '/giftboxDetails',
    name: 'giftboxDetails',
    component: GiftboxDetail,
    meta: {
      title: '礼盒详情',
      icon: 'dashboard'
    },
  
}

  ,

  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  },
  {
    path: '/breadcrumb',
    component: Breadcrumb
  },
  {
    path: '/order',
    name: 'order',
    component: Order,
    meta: {
      title: '订单',
      icon: 'dashboard'
    },
    children: [{
        path: '',
        name: '',
        component: All
      },
      {
        path: 'panding',
        name: 'panding',
        component: Panding,
        meta: {
          title: '待付款',
          icon: 'dashboard'
        },
      },
      {
        path: 'receipt',
        name: 'receipt',
        component: Receipt,
        meta: {
          title: '待收货',
          icon: 'dashboard'
        },
      },
      {
        path: 'comment',
        name: 'comment',
        component: Comment,
        meta: {
          title: '待评价',
          icon: 'dashboard'
        },
      },



    ]
  },
  {
    path: '/cart',
    name: 'cart',
    component: Cart,
    meta: {
      title: '购物车',
      icon: 'dashboard'
    },
  },
  {
    path: '/flowers',
    name: 'flowers',
    component: Flowers,
    meta: {
      title: '鲜花',
      icon: 'dashboard'
    },
  },
  {
    path: '/bouquets',
    name: 'bouquets',
    component: Bouquets,
    meta: {
      title: '花束',
      icon: 'dashboard'
    },
  },
  
  {
    path: '/giftboxs',
    name: 'giftboxs',
    component: Giftboxs,
    meta: {
      title: '礼盒',
      icon: 'dashboard'
    },
  },
  {
    path: '/cakes',
    name: 'cakes',
    component: Cakes,
    meta: {
      title: '蛋糕',
      icon: 'dashboard'
    },
  },


]









const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router